// vue.config.js
const { VantResolver } = require('@vant/auto-import-resolver');
const ComponentsPlugin = require('unplugin-vue-components/webpack');

module.exports = {
  lintOnSave:false,
  css: {

    loaderOptions: {

      postcss: {

        plugins: [

          require('postcss-pxtorem')({ rootValue: 37.5, propList: ['*'] }),

        ],

      },

    },

  },

   configureWebpack: {
    plugins: [
      //ComponentsPlugin({ resolvers: [VantResolver()] }), // 当 unplugin-vue-components 版本小于 0.26.0
      ComponentsPlugin.default({ resolvers: [VantResolver()] }), //当 unplugin-vue-components 版本大于等于 0.26.0
    ],
  },
};